package com.kingjw

import com.supermap.bdt.io.geomesahbase.GeoMesaHBaseWriter
import com.supermap.bdt.io.sdx.SDXReader
import org.apache.spark.{SparkConf, SparkContext}

/**
 *
 * @Package: com.kingjw
 * @ClassName: TestController
 * @Author: 王坚伟
 * @CreateTime: 2022/6/9 11:32
 * @Description:
 */
object TestController {
  def main(args: Array[String]): Unit = {
    //创建Spark运行配置对象
    val sparkConf = new SparkConf().setMaster("local[*]").setAppName("WordCount")

    //创建Spark上下文环境对象（连接对象）
    val sc : SparkContext = new SparkContext(sparkConf)

    val udbPath:String = "E:\\work\\钉钉下载\\bou2_4p.udb"

    val proRDD = SDXReader.readFromUDB(sc,udbPath,"province")
    GeoMesaHBaseWriter.write(proRDD,"china","province","10.1.6.133:2181")
    println("success")

  }



}
